package plugin

import (
	"time"
)

const (
	timeFormart = "2006-01-02 15:04:05"
)

type LocalTime time.Time

func (localTime LocalTime) MarshalJSON() ([]byte, error) {
	b := make([]byte, 0, len(timeFormart)+2)
	b = append(b, '"')
	b = time.Time(localTime).AppendFormat(b, timeFormart)
	b = append(b, '"')
	return b, nil
}
